import Vue from "vue";
import Vuex from "vuex";
Vue.use(Vuex);
const getLocalStorageItem = (key, defaultValue) => {
  const item = localStorage.getItem(key);
  if (item) {
    try {
      return JSON.parse(item);
    } catch (e) {
      // 如果JSON解析失败，返回默认值
      console.error(`Error parsing JSON for ${key}:`, e);
      return defaultValue;
    }
  }
  return defaultValue;
};
export default new Vuex.Store({
  state: {
    isCollapsed: false,
    loadCompleted: false,
  },
  mutations: {

  },
  actions: {

  }
});
